<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="fy.bean.*,java.util.*,java.io.*"%>
<%
	request.setCharacterEncoding("utf-8");
String lb = null;
if((request.getParameter("category")!=null)){
 lb = request.getParameter("category");
}else if(session.getAttribute("category")!=null){
 lb =session.getAttribute("category").toString();
}else{
  response.sendRedirect("../backstage.jsp");
}
session.setAttribute("category", lb);
	int id = Integer.parseInt(request.getParameter("id"));
	NewsBean newsBean = new NewsBean();
	if (newsBean.doDel(id)) {
		response.setCharacterEncoding("utf-8");
		PrintWriter pout = response.getWriter();
		pout.print("<script>alert('success');window.location.href = '../content.jsp';</script>");
		pout.flush();
		pout.close();
	} else {
		response.setCharacterEncoding("utf-8");
		PrintWriter pout = response.getWriter();
		pout.print("<script>alert('不成功'); window.location='../content.jsp' </script>");
		pout.flush();
		pout.close();
		//response.sendRedirect("login.html");
	}
	;
%>